<?php 
/* SVN FILE: $Id$ */
/* GoodsGallery Test cases generated on: 2009-05-30 23:05:00 : 1243740360*/
App::import('Model', 'GoodsGallery');

class GoodsGalleryTestCase extends CakeTestCase {
	var $GoodsGallery = null;
	var $fixtures = array('app.goods_gallery', 'app.goods');

	function startTest() {
		$this->GoodsGallery =& ClassRegistry::init('GoodsGallery');
	}

	function testGoodsGalleryInstance() {
		$this->assertTrue(is_a($this->GoodsGallery, 'GoodsGallery'));
	}

	function testGoodsGalleryFind() {
		$this->GoodsGallery->recursive = -1;
		$results = $this->GoodsGallery->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('GoodsGallery' => array(
			'id'  => 1,
			'img_url'  => 'Lorem ipsum dolor sit amet',
			'thumb_url'  => 'Lorem ipsum dolor sit amet',
			'img_desc'  => 'Lorem ipsum dolor sit amet',
			'img_original'  => 'Lorem ipsum dolor sit amet',
			'goods_id'  => 1
		));
		$this->assertEqual($results, $expected);
	}
}
?>